package br.com.felix.bmt.model;

import java.io.Serializable;

/**
 * Represents a registered user in the Blog system.
 * */
public class User implements Serializable{

	private static final long serialVersionUID = -5697467376941247802L;
	
	public String name;

    public String gender;

    public String password;

	@Override
	public boolean equals(Object obj) {
		if(obj == null)return false;
		if(obj instanceof User){
			User other = (User)obj;
			if(name == null || other.name == null)return false;
			return name.equals(other.name);
		}
		return false;
	}

	@Override
	public int hashCode() {
		if(name!=null)return name.hashCode();
		return 0;
	}
}
